package com.shenjinzheng.dk.user.controller;

import com.shenjinzheng.dk.common.Result;
import com.shenjinzheng.dk.user.entity.UserInfo;
import com.shenjinzheng.dk.user.service.UserInfoService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户信息表(存储用户的基本信息) 前端控制器
 * </p>
 *
 * @author shenjinzheng
 * @since 2025-01-22
 */

@Slf4j
@RestController
@RequestMapping("/userInfo")
public class UserInfoController {
    @Resource
    private UserInfoService userInfoService;

    @PostMapping("")
    public Result<Object> save(@RequestBody UserInfo userInfo) {
        log.info("userInfo:{}", userInfo);
        userInfoService.save(userInfo);
        return Result.success();
    }

}
